<?php
/**
 * Created by PhpStorm.
 * User: yuguozhen
 * Date: 16/7/29
 * Time: 下午5:16
 */
namespace models\Timer\Count;
class GuidanceClassModel extends \models\GuidanceClassModel{

    //每日新增课程数
    public function GUIDANCE_CLASS($prev_start,$prev_end){
        $count = $this->where('VALID_FLAG','=','ENABLE')
            ->where('belong_category','=',0)
            ->where('CREATE_TIME','>=',$prev_start)
            ->where('CREATE_TIME','<=',$prev_end)
            ->count();

        $sql = "select count(1) from `guidance_class` where
VALID_FLAG = ENABLE and belong_category = 0 and CREATE_TIME >= ".$prev_start." and CREATE_TIME<=".$prev_end;
//        $errpath = $this->config->logs->exec_timer_static_sql;
//        $this->monolog('exec_sql_static',$errpath,$level=\Monolog\Logger::INFO,$content=$sql,$slevel='info');

        return $count;
    }

    //每日新增公共平台课程数
//    public function EXPERT_CLASS($prev_start,$prev_end){
//        $count = $this->where('VALID_FLAG','=','ENABLE')
//            ->where('belong_category','=',0)
//            ->where('expert_review','=','PASSED')
//            ->where('CREATE_TIME','>=',$prev_start)
//            ->where('CREATE_TIME','<=',$prev_end)
//            ->count();
//        return $count;
//    }




}